package cn.glutnn.service;

import cn.glutnn.entity.Result;
import cn.glutnn.entity.User;
import cn.glutnn.entity.dto.LoginDTO;
import cn.glutnn.entity.dto.PasswordDTO;
import cn.glutnn.entity.dto.RegisterDTO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;


/**
 * (User)表服务接口
 *
 * @author msh
 * @since 2024-10-24 16:05:22
 */
public interface UserService extends IService<User> {

    Result login(LoginDTO loginDTO);

    Result<User> updatePassword(PasswordDTO passwordDTO);

    Result<User> selectByName();


    Result<User> updateByUsername(User user);

    Result<List<User>> selectALlList();

    Result<User> addUser(User user);

    Result<User> updateUser(String userName,User user);

    Result<User> deleteUserByUsername(String username);

    Result<User> selectUserByName(String userName);

    Result<Page<User>> selectAllUserByPage(Integer pageNum);

    Result<Page<User>> selectUserByPageAndNameAndOther(Integer pageNum, Integer pageSize, User user);

    Result register(RegisterDTO registerDTO);

    void logout();
}

